<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改</title>
    <link th:href="@{/bootstrap/css/bootstrap.min.css}" rel="stylesheet">
</head>
<body>
<div class="container main">
    <form action="/ingredientUpdate" method="post">
        <div class="form-group" style="display: none">
            <label for="id" class="control-label">ID:</label>
            <input type="text" class="form-control" id="id" name="id" th:value="${ingredient.id}" required="required">
        </div>
        <div class="form-group">
            <label for="name" class="control-label">名称:</label>
            <input type="text" class="form-control" id="name" name="name" th:value="${ingredient.name}" required="required"
                   oninvalid="setCustomValidity('请输入名称！');" oninput="setCustomValidity('');">
        </div>
        <div class="form-group">
            <label for="stock" class="control-label">库存:</label>
            <input class="form-control" th:value="${ingredient.stock}" id="stock" name="stock" required="required"
                   oninvalid="setCustomValidity('请输入库存！');" oninput="setCustomValidity('');">
        </div>
        <div class="form-group">
            <input class="btn btn-primary" type="submit" value="保存">
        </div>
    </form>

</div>

</body>
</html>